﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Koonsoft.HYCRM.BLL;

public partial class LoginCondition_UserMonthLoginCondition :BasePage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if(Request["LoginName"]!=null && Request["Time"]!=null)
        {
            string loginName;
            DateTime dtStart;
            try
            {
                loginName = Request["LoginName"].ToString();
                dtStart = Convert.ToDateTime(Convert.ToDateTime(Request["Time"]).ToString("yyyy-MM-1"));
            }
            catch (Exception)
            {
                AlterAndRedirect("请求错误，请联系管理员", "../default.aspx");
                return;
            }

            GridView1.DataSource = new LoginConditionBLL().GetEmplyeeLoginCondition(dtStart, dtStart.AddMonths(1).AddDays(-1), loginName);
            GridView1.DataBind();
        }
    }
}